/PROG  PNS004300
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "825B-1231";
PROG_SIZE	= 3188;
CREATE		= DATE 25-02-13  TIME 09:49:06;
MODIFIED	= DATE 25-02-13  TIME 09:49:06;
FILE_NAME	= PNS0041;
VERSION		= 0;
LINE_COUNT	= 113;
MEMORY_SIZE	= 3680;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0041 ;
   7:  !  PART:53338597/8598 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.1    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC70 BREAK    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:  DO[1]=OFF ;
  51:J P[3:PICK APPROACH] 100% CNT60 ACC100    ;
  52:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  53:  PAYLOAD[2] ;
  54:  CALL CHK_PICK    ;
  55:   ;
  56:J P[5:PICK DEPART] 100% CNT70 ACC100    ;
  57:  MONITOR Z_CHECH ;
  58:  DO[1]=ON ;
  59:  DO[8]=PULSE,1.0sec ;
  60:   ;
  61:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  62:  LBL[30:GOTO DROP POUNCE] ;
  63:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  64:   ;
  65:  LBL[40:AT DROP POUNCE] ;
  66:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  67:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  68:  IF DI[18]=ON,JMP LBL[60] ;
  69:  JMP LBL[40] ;
  70:   ;
  71:  LBL[50:MOVE DROP SNEAK] ;
  72:  OVERRIDE=R[5] ;
  73:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  74:  LBL[51:DROP OR C-P-S] ;
  75:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  76:  IF DI[18]=ON,JMP LBL[40] ;
  77:  JMP LBL[51] ;
  78:  JMP LBL[50] ;
  79:   ;
  80:  LBL[60:MOVE CLS-PRS-ACC] ;
  81:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  82:  PAUSE ;
  83:  JMP LBL[30] ;
  84:   ;
  85:  LBL[80:DROP ENABLED] ;
  86:  !PROCEED TO DROP ;
  87:  TIMER[4]=RESET ;
  88:  TIMER[4]=START ;
  89:   ;
  90:  DO[4]=OFF ;
  91:  OVERRIDE=R[5] ;
  92:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
  93:  MONITOR END Z_CHECH ;
  94:  DO[6]=PULSE,1.0sec ;
  95:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  96:  PAYLOAD[1] ;
  97:  CALL CHK_DROP    ;
  98:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
  99:  DO[7]=PULSE,1.0sec ;
 100:  TIMER[4]=STOP ;
 101:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 102:  !GOTO PICK POUNCE ;
 103:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 104:  IF DI[29]=ON,JMP LBL[90] ;
 105:  JMP LBL[10] ;
 106:   ;
 107:  LBL[90:END OF CYCLE] ;
 108:  TIMER[1]=STOP ;
 109:  R[4]=TIMER[1]    ;
 110:J P[1:MIDDLE] 50% CNT100    ;
 111:  MOVE TO HOME    ;
 112:   ;
 113:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.571  mm,	Y =   225.598  mm,	Z =  -641.339  mm,
	W =   179.995 deg,	P =     -.002 deg,	R =   -90.000 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2604.631  mm,	Y =    54.558  mm,	Z =  -930.158  mm,
	W =   179.617 deg,	P =    -1.013 deg,	R =   -91.917 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2604.631  mm,	Y =    54.558  mm,	Z =  -979.598  mm,
	W =   179.617 deg,	P =    -1.013 deg,	R =   -91.917 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2604.630  mm,	Y =    54.559  mm,	Z = -1098.798  mm,
	W =   179.617 deg,	P =    -1.013 deg,	R =   -91.917 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2606.602  mm,	Y =    58.274  mm,	Z =  -983.805  mm,
	W =   179.625 deg,	P =    -1.009 deg,	R =   -91.902 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2823.285  mm,	Y =  -376.982  mm,	Z =  -912.250  mm,
	W =  -179.629 deg,	P =     -.263 deg,	R =   -89.121 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2670.023  mm,	Y = -1343.707  mm,	Z =  -968.020  mm,
	W =  -179.989 deg,	P =     -.004 deg,	R =   -87.753 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.820  mm,	Y = -2690.339  mm,	Z =  -967.213  mm,
	W =   179.475 deg,	P =     1.386 deg,	R =   -92.251 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.821  mm,	Y = -3429.936  mm,	Z = -1052.813  mm,
	W =   179.475 deg,	P =     1.387 deg,	R =   -92.251 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.821  mm,	Y = -3429.936  mm,	Z = -1155.853  mm,
	W =   179.475 deg,	P =     1.386 deg,	R =   -92.251 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2615.821  mm,	Y = -3429.936  mm,	Z = -1052.813  mm,
	W =   179.475 deg,	P =     1.387 deg,	R =   -92.251 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2726.193  mm,	Y = -1605.200  mm,	Z = -1021.668  mm,
	W =  -179.555 deg,	P =      .304 deg,	R =   -89.653 deg
};
/END
